<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8" />
    <title>喜欢的商品-{eyou:global name='web_name' /}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    {eyou:static file="users/skin/css/bootstrap.min.css"/}
    {eyou:static file="users/skin/css/basic.css"/}
    {eyou:static file="users/skin/css/eyoucms.css"/}
    {eyou:static file="users/skin/css/shop.css"/}
    {eyou:static  file="users/skin/css/tb_style.css"/}
    <!-- 新样式 2020-11-25 -->
    {eyou:static file="users/skin/css/element/index.css" /}
    {eyou:static file="users/skin/css/e-user.css" /}
    {eyou:include file="users/skin/css/diy_css.htm"/}

    {eyou:static file="/public/static/common/js/jquery.min.js"/}
    {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
    {eyou:static file="/public/static/common/js/tag_global.js"/}
</head>

<body class="centre shop">
<!-- 头部 -->
{eyou:include file="users/users_header.htm" /}
<!-- END -->
<div class="breadcrumbs">
    <div class="w1226">
        <a href="{eyou:global name='web_cmsurl'/}">首页</a> <span class="sep">/</span> <a href="{eyou:url link='user/Users/index' /}">会员中心</a> <span class="sep">/</span> <span>喜欢的商品</span>
    </div>
</div>
<div class="ey-body-bg">
    <div class="ey-body pd0">
        <div class="ey-container w1226">
			<!-- 侧边 -->
			{eyou:include file="users/users_left.htm" /}
			<!-- END -->
			<!-- 中部 -->
			<div class="ey-con fr" >
				<div class="mi-uc-box uc-main-box mi-user-favorite">
				    <div class="uc-content-box portal-content-box">
				        <div class="uc-context">
				            <div class="box-hd">
				                <h1 class="title">喜欢的商品</h1>
				            </div>
				            <div class="box-bd">
				                <div class="xm-goods-list-wrap">
				                    <div>
                                        {empty name="$eyou.field.data"}
                                        <div class="el-row tc pt100 pb100 bgfff">
                                            <p class="mb10"><img id="litpic_img" src="/public/static/common/images/null-data.png"></p>
                                        </div>
                                        {eyou:else /}
				                        <ul class="xm-goods-list clearfix">
                                            {eyou:volist name="$eyou.field.data" id="vo"}
				                            <li class="xm-goods-item">
				                                <div class="figure-img-xin">
                                                    <a href="{$vo.arcurl}" target="_blank">
                                                        <img src="{$vo.litpic}">
                                                    </a>
				                                </div>
				                                <h3 class="title">
                                                    <a href="{$vo.arcurl}" target="_blank">{$vo.title}</a>
				                                </h3>
				                                <p class="price"><span><span >{$vo.users_price}元</span></span></p>
				                                <p class="rank">
				                                    <!---->
				                                </p>
				                                <div class="actions">
                                                    <a href="javascript:void(0);" class="btn-xin btn-small-xin btn-line-gray-xin" data-id='{$vo.id}' data-url="{$eyou.field.delurl}" onclick="DelData(this);">删除</a>
                                                    <a target="_blank" href="{$vo.arcurl}" class="btn-xin btn-small-xin btn-primary-xin">查看详情</a>
                                                </div>
				                            </li>
                                            {/eyou:volist}
				                        </ul>
                                        
                                       {/empty}
				                        <!---->
				                    </div>
				                </div>
				            </div>
				        </div>
				    </div>
                    <div style="text-align: center;">
                    	{$page}
                    	{eyou:if condition="!empty($pager->totalRows)"}
                    	<div class="fytotal">共{$pager->totalRows}条记录</div>
                    	{/eyou:if}
                    </div>
				</div>
				
			<!-- END -->
			</div>

        </div>
    </div>
</div>
<script type="text/javascript">
    // 内容查看
    function ArcUrl(obj) {
        window.open($(obj).attr('data-arurl'));
    }
    // 删除单个收藏
    function DelData(obj) {
        layer.confirm('是否删除该收藏？', {
            title: false,
            btn: ['是','否'] //按钮
        }, function(){
            layer_loading('正在处理');
            // 确定
            $.ajax({
                type: "POST",
                url: $(obj).attr('data-url'),
                data: {del_id:$(obj).attr('data-id')},
                dataType: 'json',
                success: function (res) {
                    layer.closeAll();
                    if(res.code == 1){
                        layer.msg(res.msg, {icon: 1});
                        window.location.reload();
                    }else{
                        showErrorAlert(res.msg);
                    }
                },
                error:function(e){
                    layer.closeAll();
                    showErrorAlert(e.responseText);
                }
            });
        }, function(index){
            layer.close(index);
        });
    }
    // 批量删除收藏
    function BatchDelData(obj, name) {
        var a = [];
        $('input[name^='+name+']').each(function(i,o){
            if($(o).is(':checked')){
                a.push($(o).val());
            }
        })
        if(a.length == 0){
            showErrorAlert('请至少选择一项！');
            return;
        }
        // 删除按钮
        layer.confirm('确认批量删除收藏？', {
            title: false,
            btn: ['确定', '取消'] //按钮
        }, function () {
            layer_loading('正在处理');
            $.ajax({
                type: "POST",
                url: $(obj).attr('data-url'),
                data: {del_id:a},
                dataType: 'json',
                success: function (res) {
                    layer.closeAll();
                    if(res.code == 1){
                        layer.msg(res.msg, {icon: 1});
                        window.location.reload();
                    }else{
                        showErrorAlert(res.msg);
                    }
                },
                error:function(e){
                    layer.closeAll();
                    showErrorAlert(e.responseText);
                }
            });
        }, function (index) {
            layer.closeAll(index);
        });
    }
</script>
{eyou:include file="users/users_footer.htm" /}
<!-- END -->